

ageList = [21, 25, 21, 23, 22, 20]

ageList.append(31)
print(f"ageList = {ageList}")

ageList.extend([29, 33, 30])
print(f"ageList = {ageList}")

index01 = ageList[0]
index02 = ageList[-1]

print(f"第一个元素是：{index01},最后一个元素是：{index02}")

index = ageList.index(31)
print(f"元素31在列表：{ageList}中的位置是：{index}")





